package com.glsc.ngateway.wordconver.exception;

public class WordConverException extends RuntimeException {
    private int status;
    private String msg;
    private Throwable throwable;

    public WordConverException(int status, String msg, Throwable throwable) {
        this.status = status;
        this.msg = msg;
        this.throwable = throwable;
    }

    public WordConverException() {
    }

    public static WordConverException error(String msg) {
        return new WordConverException(-1, msg, null);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public void setThrowable(Throwable throwable) {
        this.throwable = throwable;
    }

    @Override
    public String toString() {
        return "WordConverException{" +
                "status=" + status +
                ", msg='" + msg + '\'' +
                ", throwable=" + throwable +
                '}';
    }
}
